home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / grafix / raytracing / raystorm / examples / install_examples < prev    next >
Encoding:
Text File  |  1996-02-26  |  3.5 KB  |  131 lines

  1. ; Install_Examples - RayStorm examples installation script for Installer
  2. ;
  3. ; Copyright © 1995 Andreas Heumann
  4. ;
  5. ; $Id: Install_Examples,v 1.2 1996/24/01
  6. ;
  7. ;     Installer and Installer project icon
  8. ;     (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
  9. ;     Reproduced and distributed under license from Commodore.
  10. ;
  11. ;     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  12. ;     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  13. ;     OR RESPONSIBILITY IS ASSUMED.
  14. ;
  15. ;
  16. (welcome "    Welcome to the " @app-name " examples installation.\n")
  17.  
  18. ; What we are?
  19. (set app-name (cat @app-name " examples"))
  20.  
  21. ; These directories are always present
  22. (set dir-pat "(anims|arexx|brushes|examples|objects)")
  23.  
  24. ; The source directory name
  25. (set source-dir
  26.  (if (= 1 (exists @icon))
  27.   (pathonly (expandpath @icon))
  28.   (expandpath @icon)
  29.  )
  30. )
  31.  
  32. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  33. (procedure select-destination-directory
  34.  ;; Select destination directory for the installation. We suggest the user
  35.  ;; to install to the place from where the installer was started. This is
  36.  ;; since normally this software will be unarchived to its proper location
  37.  ;; and the files don't have to be copied any more.
  38.  ;;
  39.  (transcript "Selecting destination directory for the installation.")
  40.  (while
  41.   (
  42.     (set @default-dest
  43.      (askdir
  44.       (prompt "Select directory where " app-name " is installed.\n")
  45.       (help "    Here you can specify location where to install "
  46.               "the " app-name ".\n"
  47.               "    Installation can be made on-place. "
  48.               "This is recommended if you have already unarchived "
  49.               "the " app-name " archive to its final location. "
  50.               "In this case "
  51.               "most of the files are left where they are. "
  52.               "Only necessary files are copied to different "
  53.               "positions.\n"
  54.      )
  55.       (newpath)
  56.       (default source-dir)
  57.     )
  58.    )
  59.    (if (= 2 (exists @default-dest))
  60.      0
  61.      (makedir @default-dest
  62.       (infos)
  63.      )
  64.     )
  65.   )
  66.  )
  67. )
  68.  
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. (procedure
  71.  copy-files-to-destination ;;; Copy all files if not installing on-place
  72.  ;;
  73.  (if (= source-dir (expandpath @default-dest))
  74.   (message "\nSource and destination directories are the same, "
  75.             "not copying."
  76.     (help "    The " app-name " files don't have to be copied, "
  77.            "since the source and the destination directories are "
  78.            "the same."
  79.     )
  80.   )
  81.   ((transcript "Copying " app-name " files from " source-dir " to "
  82.                 @default-dest "."
  83.     )
  84.    (foreach source-dir dir-pat
  85.     (
  86.      (set dest-dir (tackon @default-dest @each-name))
  87.       (if (NOT (exists dest-dir))
  88.        (makedir dest-dir)
  89.       )
  90.       (copyfiles (all)
  91.         (source (expandpath @each-name))
  92.         (dest dest-dir)
  93.         (prompt "Copying files to the selected location.")
  94.         (optional "askuser")
  95.       )
  96.      )
  97.     )
  98.   )
  99.  )
  100. )
  101.  
  102. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  103. ;;;
  104. ;;; Installatation sequence
  105. ;;;
  106. (message "Please remember during this installation:\n\n"
  107.      "    Read the instructions provided behind the \"Help\" "
  108.      "buttons, if you are not absolutely sure what you are doing.\n"
  109. )
  110.  
  111. (complete 00)
  112. (transcript "On making " app-name ".")
  113. (select-destination-directory)
  114. (complete 10)
  115. (copy-files-to-destination)
  116. (complete 80)
  117. (copyfiles (source source-dir)
  118.  (dest @default-dest)
  119.  (prompt "Copying files to the selected location.")
  120.  (choices "anims.info" "Readme" "Readme.info")
  121.  (files)
  122.  (infos)
  123.  (optional "askuser")
  124. )
  125. (complete 100)
  126.  
  127. ;;; All done!
  128.  
  129. ; EOF
  130.  
  131.